export const api = {
	adminLogin: '/login',
	getUserInfo: '/user/info', //获取用户信息
	getUserList: '/admin/list', //获取用户列表
	saveOrUpdateUser: '/admin/saveOrUpdate', //新增编辑用户
	getSchoolList: '/school/list', //学校管理
	saveOrUpdateSchool: '/school/saveOrUpdate', //编辑或新增学校
	getNationlineList: '/nationline/list', //国家线管理
	getCourseList: '/course/list', //推荐课程管理
	saveOrUpdateCourse: '/course/saveOrUpdate',
	delCourse: '/course/delete',
	saveOrUpdateNationalLine:'/nationline/saveOrUpdate', //编辑国家线
	getRetrialList: '/retrial/list',
	saveOrUpdateRetrial:'/retrial/saveOrUpdate',//
	deleteRetrial: '/retrial/delete',
	getRecordList: '/assessRecord/list', //获取估分列表
	getConfig: '/config/list', //配置
	getQuestionList: '/question/list', //题目列表
	addQuestion: '/question/insert', //新增题目
	editQuestion: '/question/update', //编辑题目
	delQuestion: '/question/delete', //删除
	getAreasOrMajor: '/config/getAreasOrMajor', // 获取区域和专业下拉菜单信息
	uploadFile: '/file/upload', //上传file
	editConfig: '/config/update',
	getSchool: '/school/getSchool', // 获取学校下拉菜单信息
		getMajorsBySchool:'/school/getMajorsBySchool'
}
import {
	axios
} from '@/utils/request'

//post
export function postAction(url, parameter, obj = {}) {
	return axios(Object.assign({}, {
		url: url,
		method: 'post',
		headers: {
			'Content-Type': 'application/json;charset=UTF-8'
		},
		data: parameter
	}, obj))
}
//get
export function getAction(url, parameter, obj = {}) {
	console.log('parameter', parameter)
	return axios(Object.assign({}, {
		url: url,
		method: 'get',
		headers: {
			'Content-Type': 'application/json;charset=UTF-8'
		},
		params: parameter
	}, obj))
}
